#include "cform.h"

#include <time.h>
#include <stdlib.h>
#include <stdio.h>

extern void predict_classifier(char *datacfg, char *cfgfile, char *weightfile, char *filename, int top);
extern void test_detector(char *datacfg, char *cfgfile, char *weightfile, char *filename, float thresh, float hier_thresh, char *outfile, int fullscreen);
extern void run_yolo(int argc, char **argv);
extern void run_coco(int argc, char **argv);
extern void run_nightmare(int argc, char **argv);

void backward_bias(float *bias_updates, float *delta, int batch, int n, int size) {
    int i, b;
    for (b = 0; b < batch; ++b) {
        for (i = 0; i < n; ++i) {
            bias_updates[i] += sum_array(delta + size * (i + b * n), size);
        }
    }
}